﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AndroidEditor.WForm
{
    /// <summary>
    /// 
    /// </summary>
    /// <remarks></remarks>
    public partial class CPUForm : Form
    {
        /// <summary>
        /// 
        /// </summary>
        private bool c1 = true;
        /// <summary>
        /// 
        /// </summary>
        private bool c2 = false;
        /// <summary>
        /// Initializes a new instance of the <see cref="CPUForm"/> class.
        /// </summary>
        /// <param name="c1">if set to <c>true</c> [c1].</param>
        /// <param name="c2">if set to <c>true</c> [c2].</param>
        /// <remarks></remarks>
        public CPUForm(bool c1, bool c2)
        {
            InitializeComponent();
            this.c1 = c1;
            this.c2 = c2;
        }

        /// <summary>
        /// Handles the Click event of the button2 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }

        /// <summary>
        /// Handles the Click event of the button1 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        private void button1_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
        }

        /// <summary>
        /// Handles the CheckedChanged event of the checkBox1 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (!checkBox1.Checked && !checkBox2.Checked)
            {
                checkBox1.Checked = true;
            }
        }

        /// <summary>
        /// Handles the Load event of the CPUForm control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        private void CPUForm_Load(object sender, EventArgs e)
        {
            checkBox1.Checked = c1;
            checkBox2.Checked = c2;
        }

        /// <summary>
        /// Checks the box2.
        /// </summary>
        /// <returns></returns>
        /// <remarks></remarks>
        public bool CheckBox2()
        {
            return checkBox2.Checked;
        }

        /// <summary>
        /// Checks the box1.
        /// </summary>
        /// <returns></returns>
        /// <remarks></remarks>
        public bool CheckBox1()
        {
            return checkBox1.Checked;
        }
    }
}
